package com.xuerhua.yxt.reqVo;

import java.io.Serializable;

import org.apache.commons.lang.StringUtils;

import com.xuerhua.yxt.utils.StringUtil;

public class HkFaceReqVO implements Serializable {
	
	private static final long serialVersionUID = -388775067758516300L;
	//人脸组code
	private String faceGroupCode;
	//人脸code
	private String faceIndexCode;
	//姓名
	private String name;
	//性别:1:男 2:女 0:未知
	private String sex;
	//证件类型 证件类型:111:身份证 414:护照 113:户口簿 335:驾驶证 131:工作证 133:学生证 990:其他
	private String certificateType;
	//证件编号
	private String certificateNum;
	//人脸图片的URL
	private String faceUrl;
	//人脸图片的二进制数据经过Base64编码后的字符串
	private String faceBinaryData;
	public String getFaceGroupCode() {
		return faceGroupCode;
	}
	public void setFaceGroupCode(String faceGroupCode) {
		this.faceGroupCode = faceGroupCode;
	}
	public String getFaceIndexCode() {
		return faceIndexCode;
	}
	public void setFaceIndexCode(String faceIndexCode) {
		this.faceIndexCode = faceIndexCode;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getSex() {
		if(StringUtils.isBlank(sex)) {
			return "UNKNOWN";
		}
		if("男".equals(sex.trim())) return "1";
		else if("女".equals(sex.trim())) return "2";
		return "UNKNOWN";
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public String getCertificateType() {
		if(StringUtils.isBlank(certificateType)) {
			return "OTHER";
		}
		return certificateType;
	}
	public void setCertificateType(String certificateType) {
		this.certificateType = certificateType;
	}
	public String getCertificateNum() {
		return certificateNum;
	}
	public void setCertificateNum(String certificateNum) {
		if(StringUtils.isNotBlank(certificateNum)) {
			if(certificateNum.trim().length() == 18) {
				this.certificateType = "111";
			}else {
				certificateNum = StringUtil.removeSpecialChar(certificateNum);
			}
		}
		this.certificateNum = certificateNum;
	}
	public String getFaceUrl() {
		return faceUrl;
	}
	public void setFaceUrl(String faceUrl) {
		this.faceUrl = faceUrl;
	}
	public String getFaceBinaryData() {
		return faceBinaryData;
	}
	public void setFaceBinaryData(String faceBinaryData) {
		this.faceBinaryData = faceBinaryData;
	}
	
	
}
